<?php
	session_start();
	if(!isset($_SESSION['login'])){
		header('../vue/location:index.php');
	}
	include '../model/model_sql.php';
	$myvar = new SQLBlog();
        $cat=htmlentities($_GET['cat_new']);
	if(!empty($_GET['cat_new']) && $var=$myvar->AjouterCategorie($cat,null)){
	header('location:../vue/ajouter.php');
	} else header('location:../vue/ajouter.php');

?>